﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
//using Balder.Core.Geometries;
//using Balder.Core.Services;
using BalderMatrix = Balder.Core.Math.Matrix;
using Balder.Core.Math;
using Balder.Core.Objects.Geometries;
using Balder.Core.Assets;

namespace Studio
{
    public enum Axis
    {
        X,
        Y,
        Z,
    };
    public class ZeusMesh : Mesh
    {
        public ZeusMesh(IAssetLoaderService assetLoaderService):base()
        {

        }
        public void CreateRotation(float Angel,Axis axis)
        {
            if(axis == Axis.X)
                this.World = BalderMatrix.CreateRotationX(Angel);
            if(axis == Axis.Y)
                this.World = BalderMatrix.CreateRotationY(Angel);
            if (axis == Axis.Z)
                this.World = BalderMatrix.CreateRotationZ(Angel); 
        }
        public void CreateTranslation(float value, Axis axis)
        {
            Vector NewPos;
            if (axis == Axis.X)
                this.Position.X += value;
            if (axis == Axis.Y)
                this.Position.Y += value;
            if (axis == Axis.Z)
                this.Position.Z += value;

            NewPos = new Vector((float) Position.X, (float) Position.Y,
                    (float) Position.Z);
            this.World = BalderMatrix.CreateTranslation(NewPos);
        }
        public void CreateScale(float value)
        {
            this.Scale.X *= value;
            this.Scale.Y *= value;
            this.Scale.Z *= value;
            this.World = BalderMatrix.CreateScale(this.Scale);
        }
        
    }
}
